3.194 \(\int \sin (a+b x) \sin (c+d x) \, dx\)

Optimal. Leaf size=43 \[ \frac {\sin (a+x (b-d)-c)}{2 (b-d)}-\frac {\sin (a+x (b+d)+c)}{2 (b+d)} \]

[Out]

1/2*sin(a-c+(b-d)*x)/(b-d)-1/2*sin(a+c+(b+d)*x)/(b+d)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4569, 2637} \[ \frac {\sin (a+x (b-d)-c)}{2 (b-d)}-\frac {\sin (a+x (b+d)+c)}{2 (b+d)} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*x]*Sin[c + d*x],x]

[Out]

Sin[a - c + (b - d)*x]/(2*(b - d)) - Sin[a + c + (b + d)*x]/(2*(b + d))

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 4569

Int[Sin[v_]^(p_.)*Sin[w_]^(q_.), x_Symbol] :> Int[ExpandTrigReduce[Sin[v]^p*Sin[w]^q, x], x] /; ((PolynomialQ[
v, x] && PolynomialQ[w, x]) || (BinomialQ[{v, w}, x] && IndependentQ[Cancel[v/w], x])) && IGtQ[p, 0] && IGtQ[q
, 0]

Rubi steps

\begin {align*} \int \sin (a+b x) \sin (c+d x) \, dx &=\int \left (\frac {1}{2} \cos (a-c+(b-d) x)-\frac {1}{2} \cos (a+c+(b+d) x)\right ) \, dx\\ &=\frac {1}{2} \int \cos (a-c+(b-d) x) \, dx-\frac {1}{2} \int \cos (a+c+(b+d) x) \, dx\\ &=\frac {\sin (a-c+(b-d) x)}{2 (b-d)}-\frac {\sin (a+c+(b+d) x)}{2 (b+d)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 43, normalized size = 1.00 \[ \frac {\sin (a+x (b-d)-c)}{2 (b-d)}-\frac {\sin (a+x (b+d)+c)}{2 (b+d)} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*x]*Sin[c + d*x],x]

[Out]

Sin[a - c + (b - d)*x]/(2*(b - d)) - Sin[a + c + (b + d)*x]/(2*(b + d))

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 42, normalized size = 0.98 \[ \frac {d \cos \left (d x + c\right ) \sin \left (b x + a\right ) - b \cos \left (b x + a\right ) \sin \left (d x + c\right )}{b^{2} - d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(d*x+c),x, algorithm="fricas")

[Out]

(d*cos(d*x + c)*sin(b*x + a) - b*cos(b*x + a)*sin(d*x + c))/(b^2 - d^2)

________________________________________________________________________________________

giac [A]  time = 0.36, size = 40, normalized size = 0.93 \[ -\frac {\sin \left (b x + d x + a + c\right )}{2 \, {\left (b + d\right )}} + \frac {\sin \left (b x - d x + a - c\right )}{2 \, {\left (b - d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(d*x+c),x, algorithm="giac")

[Out]

-1/2*sin(b*x + d*x + a + c)/(b + d) + 1/2*sin(b*x - d*x + a - c)/(b - d)

________________________________________________________________________________________

maple [A]  time = 0.42, size = 40, normalized size = 0.93 \[ \frac {\sin \left (a -c +\left (b -d \right ) x \right )}{2 b -2 d}-\frac {\sin \left (a +c +\left (b +d \right ) x \right )}{2 \left (b +d \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(b*x+a)*sin(d*x+c),x)

[Out]

1/2*sin(a-c+(b-d)*x)/(b-d)-1/2*sin(a+c+(b+d)*x)/(b+d)

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 40, normalized size = 0.93 \[ -\frac {\sin \left (b x + d x + a + c\right )}{2 \, {\left (b + d\right )}} - \frac {\sin \left (-b x + d x - a + c\right )}{2 \, {\left (b - d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(d*x+c),x, algorithm="maxima")

[Out]

-1/2*sin(b*x + d*x + a + c)/(b + d) - 1/2*sin(-b*x + d*x - a + c)/(b - d)

________________________________________________________________________________________

mupad [B]  time = 1.06, size = 84, normalized size = 1.95 \[ \frac {d\,\left (\frac {\sin \left (a+c+b\,x+d\,x\right )}{2}+\frac {\sin \left (a-c+b\,x-d\,x\right )}{2}\right )}{b^2-d^2}-\frac {b\,\left (\frac {\sin \left (a+c+b\,x+d\,x\right )}{2}-\frac {\sin \left (a-c+b\,x-d\,x\right )}{2}\right )}{b^2-d^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x)*sin(c + d*x),x)

[Out]

(d*(sin(a + c + b*x + d*x)/2 + sin(a - c + b*x - d*x)/2))/(b^2 - d^2) - (b*(sin(a + c + b*x + d*x)/2 - sin(a -
 c + b*x - d*x)/2))/(b^2 - d^2)

________________________________________________________________________________________

sympy [A]  time = 1.49, size = 153, normalized size = 3.56 \[ \begin {cases} x \sin {\relax (a )} \sin {\relax (c )} & \text {for}\: b = 0 \wedge d = 0 \\\frac {x \sin {\left (a - d x \right )} \sin {\left (c + d x \right )}}{2} - \frac {x \cos {\left (a - d x \right )} \cos {\left (c + d x \right )}}{2} - \frac {\sin {\left (a - d x \right )} \cos {\left (c + d x \right )}}{2 d} & \text {for}\: b = - d \\\frac {x \sin {\left (a + d x \right )} \sin {\left (c + d x \right )}}{2} + \frac {x \cos {\left (a + d x \right )} \cos {\left (c + d x \right )}}{2} - \frac {\sin {\left (c + d x \right )} \cos {\left (a + d x \right )}}{2 d} & \text {for}\: b = d \\- \frac {b \sin {\left (c + d x \right )} \cos {\left (a + b x \right )}}{b^{2} - d^{2}} + \frac {d \sin {\left (a + b x \right )} \cos {\left (c + d x \right )}}{b^{2} - d^{2}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(d*x+c),x)

[Out]

Piecewise((x*sin(a)*sin(c), Eq(b, 0) & Eq(d, 0)), (x*sin(a - d*x)*sin(c + d*x)/2 - x*cos(a - d*x)*cos(c + d*x)
/2 - sin(a - d*x)*cos(c + d*x)/(2*d), Eq(b, -d)), (x*sin(a + d*x)*sin(c + d*x)/2 + x*cos(a + d*x)*cos(c + d*x)
/2 - sin(c + d*x)*cos(a + d*x)/(2*d), Eq(b, d)), (-b*sin(c + d*x)*cos(a + b*x)/(b**2 - d**2) + d*sin(a + b*x)*
cos(c + d*x)/(b**2 - d**2), True))

________________________________________________________________________________________